# 搭建镜像
kubectl apply -f ./nginx-deployment.yaml
#deployment.apps/nginx-deployment created

# 查看镜像
kubectl get pods
#deployment.apps/nginx-deployment unchanged
#NAME                                READY   STATUS    RESTARTS   AGE
#nginx-deployment-76c57897c6-72pwz   1/1     Running   0          52s
#nginx-deployment-76c57897c6-7x4vv   1/1     Running   0          52s
#nginx-deployment-76c57897c6-bvt95   1/1     Running   0          52s
#nginx-deployment-76c57897c6-dnl8l   1/1     Running   0          52s

# 进入镜像
kubectl exec -it nginx-deployment-76c57897c6-72pwz -- /bin/bash
#deployment.apps/nginx-deployment unchanged
#NAME                                READY   STATUS    RESTARTS   AGE
#nginx-deployment-76c57897c6-72pwz   1/1     Running   0          7m58s
#nginx-deployment-76c57897c6-7x4vv   1/1     Running   0          7m58s
#nginx-deployment-76c57897c6-bvt95   1/1     Running   0          7m58s
#nginx-deployment-76c57897c6-dnl8l   1/1     Running   0          7m58s
#root@nginx-deployment-76c57897c6-72pwz:/#

# 删除所有
kubectl delete deployment --all